package com.jerei.store.service;

import com.jerei.store.entity.Address;
import com.jerei.store.entity.District;

import java.util.List;

/**
 * 处理收货地址数据的业务接口
 */
public interface IAddressService {

    /**
     * 新增收货地址
     * @param address   收货地址数据
     * @param uid 用户uid
     * @param username 创建名
     */
    void addAddress(Address address,Integer uid,String username);


    List<District> findAllProvince();

    List<District> findAllCity(Integer code);

    List<District> findAllArea(Integer code);


    /**
     * 查询该用户id下的所有地址
     * @param uid
     * @return
     */
    List<Address> findAllByUid(Integer uid);


    /**
     * 通过aid删除地址
     * @param aid
     */
    void deleteAddress(Integer aid);


    void setDefault(Integer aid,Integer uid,String username);




}
